#ifndef __WLACTOR_H__
#define __WLACTOR_H__
#include "WLMath.h"

class WLLevel;
class WLActor : public WLObject
{
	WLActor();
public:
	void SetPrimitive(class WLPrimitive* Primitive);
	void SetAnimation(class WLAnim* Anim);
	class WLPrimitive* GetPrimitive();
	WLActor(WLVector3& Loc, WLQuaternion& Rot );

	void UpdateAnimation(float DeltaTime);
	
	void Update(float DeltaTime);
	void Render();


	virtual void Serialize(class WLArchive& Ar){};
	unsigned int m_ID;
	WLVector3 m_Location;
	WLQuaternion m_Rotation;
	WLPrimitive* m_Primitive;
	WLAnim* m_Anim;
	class WLLevel* m_Level;
};

class WLLevel
{
public:
	std::vector<WLActor*> m_ActorArray;
	WLActor* CreateActor(WLVector3& Location, WLQuaternion& Rotation);
	void AddActor(WLActor* Actor);
	class WLRenderInfo* GetRenderInfo(WLActor* Actor);
	void CreateRenderInfo(WLActor* Actor);
	void InitLevel();
	void Update(float DeltaTime);
	void Render();
};
#endif
